﻿@model Itfort.Web.PageResult<Users.User>

@{
	ViewBag.Title = "设置基本信息";
	ViewBag.CurrentNavItem = "Basic";
	Layout = "~/Views/Shared/_Layout.cshtml";
}

@using (Html.BeginForm("Basic", "AccountInfo"))
{
	<div class="index-title">
		<h3>可修改昵称、绑定邮箱或手机号码</h3>
	</div>	

	<div class="formbox">
		@if (Model.Status == Itfort.Web.ResultStatus.Success)
  {
			<div class="ok">
				修改成功
			</div>
  }
  else
  {
			<div class="">
				@Model.FailureMessage
			</div>
  }
		<table class="form">
			<tr>
				<td>昵称：</td>
				<td>
					<p>@Html.TextBox("nickname", Model.Entiy.Nickname)</p>
					&nbsp;
				</td>
			</tr>
			<tr>
				<td>邮箱：</td>
				<td>
					<p>
						@Model.Entiy.Email
						@*@if (Model.EmailStatus == 0) { @Html.ActionLink("验证邮箱", "") }*@
						@Html.ActionLink("更换邮箱", "Email")
					</p>
					&nbsp;
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
					<input type="submit" value="确定" />
				</td>
			</tr>
		</table>
	</div>
}
@section BottomScripts
{
	<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
			$("form").validate({
				rules: {
					nickname: {
						required: true
					}
				},
				messages: {
					nickname: {
						required: "请输入昵称"
					}
				},
				errorPlacement: function (error, element) {
					error.appendTo(element.parent().parent());
				}
			});
		});
	</script>
}